package com.gl.emms.whale.util;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

/**
 * 一个聊天消息的JavaBean
 * 
 * @author way
 * 
 */
public class SystemSettingsEntity {
	private long logintimes;// 登陆次数
	private String version;// 版本号
	private String lastVersion;// 最新版本号

	public String getLastVersion() {
		return lastVersion;
	}

	public void setLastVersion(String lastVersion) {
		this.lastVersion = lastVersion;
	}

	public SystemSettingsEntity() {

	}

	public SystemSettingsEntity(long logintimes, String version) {
		super();
		this.logintimes = logintimes;
		this.version = version;
	}

	public long getLoginTimes() {
		return logintimes;
	}

	public void setLoginTimes(long logintimes) {
		this.logintimes = logintimes;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	
	/**
	 * 获取版本号
	 * @return 当前应用的版本号
	 */
	/*
	private String getVersionName() throws Exception
	   {
	           // 获取packagemanager的实例
	           PackageManager packageManager = getPackageManager();
	           // getPackageName()是你当前类的包名，0代表是获取版本信息
	           PackageInfo packInfo = packageManager.getPackageInfo(getPackageName(),0);
	           String version = packInfo.versionName;
	           return version;
	   }
	   */
}
